<% published_tags = repo.tags.published.order('published_at DESC, name DESC').limit(15) %>
<% if published_tags.length > 0 %>
  <div class="row"></div>
  <hr>
  <h4>
    Recent Tags
    <small><%= link_to 'See all', repository_tags_path(@repository.to_param) %></small>
  </h4>
  <table class='table'>
    <% published_tags.each do |tag| %>
    <tr>
      <td>
        <%= link_to tag, tag.repository_url %>
      </td>
      <% if tag.published_at.present? %>
        <td>
          <small class='text-muted'>
            <%= tag.published_at.to_date.to_fs(:long) %>
          </small>
        </td>
      <% end %>
      <td>
        <small class='text-muted'>
          <%= link_to tag.repository_url, class: 'tip', title: "Browse source on #{tag.repository.host_type}" do %>
            <%= fa_icon('tag') %>
          <% end %>
        </small>
      </td>
      <td>
        <% if tag.previous_tag %>
          <small class='text-muted'>
            <%= link_to tag.diff_url, class: 'tip', title: "View diff between #{tag} and #{tag.previous_tag}" do %>
              <%= fa_icon('random') %>
            <% end %>
          </small>
        <% end %>
      </td>
    </tr>
    <% end %>
  </table>
<% end %>
